#include "pch.h"
#include "CT3.h"

CT3::CT3(void)
{
	u = 0;
	v = 0;
	w = 0.0;
}

CT3::CT3(double u, double v, double w)
{
	this->u = u;
	this->v = v;
	this->w = w;
}

CT3::~CT3(void)
{
}

CT3 operator+(const CT3& t0, const CT3& t1)
{
	CT3 result;
	result = CT3(t0.u + t1.u, t0.v + t1.v, t0.w + t1.w);
	return result;
}

CT3 operator-(const CT3& t0, const CT3& t1)
{
	CT3 result;
	result = CT3(t0.u - t1.u, t0.v - t1.v, t0.w - t1.w);
	return result;
}

CT3 operator*(const CT3& t, double scalar)
{

	CT3 result;
	result = CT3(t.u * scalar, t.v * scalar, t.w * scalar);
	return result;
}
CT3 operator*(double scalar, const CT3& t)
{
	CT3 result;
	result = CT3(t.u * scalar, t.v * scalar, t.w * scalar);
	return result;
}

CT3 operator/(const CT3& t, double scalar)
{
	CT3 result;
	result = CT3(t.u /scalar, t.v /scalar, t.w /scalar);
	return result;
}
